<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加用户</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<link rel="stylesheet" type="text/css" href="css/teacherManager.css" />
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../myjs/DatePicker/WdatePicker.js"></script>
<script src="../../myjs/teacher/teacherManager.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>
</head>
<body>
<script>
var greyLayer ;
$(function(){
	grid = $('#tt').datagrid({
		url:'/pxglxt/teacher/getTeachers',
		pagination:true,
		singleSelect:true,
		fit:true,//表格自动填充
		loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
		toolbar:[{
			text:'添加教师',
			iconCls:'icon-add',
			handler:'newTeacher'
		},'-',{
			text:'修改教师信息',
			iconCls:'icon-edit',
			handler:'editTeacher'
			
		},'-',{
			text:'删除教师信息',
			iconCls:'icon-remove',
			handler:'delTeacher'
		}]
	});
	//初始化pagination工具开始
	var pagetool = $('#tt').datagrid('getPager');
	pagetool.pagination({				
			beforePageText:'第',
			afterPageText:'页，共{pages}页',
			displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
	//初始化pagination工具结束
	$('body').layout();
	$('#btn-save,#btn-cancel').linkbutton();
	win = $('#user-window').window({
		collapsible:false,
		minimizable:false, 
		maximizable:true, 
		closable:true,
		onClose:function(){greyLayer.close();},
		closed:true
	});
	form = win.find('form');
	greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
});
</script>
<div region="center" fit="true" style="padding: 5px;">
<table id="tt">
	<thead>
		<tr>
			<th field="tea_real_name" width="100%">教师姓名</th>
			<th field="tea_sex" width="100%">性别</th>
			<th field="tea_birthday" width="100%">生日</th>
			<th field="tea_mobile_no" width="150%">联系方式</th>
			<th field="tea_email" width="100%">Emial</th>
			<!--  <th field="tea_photo" width="100%">头像</th>-->
			<th field="tea_qq_no" width="100%">QQ</th>
			<th field="tea_msn_no" width="100%">MSN</th>
			<th field="tea_diploma_name" width="100%">学历</th>
			<th field="tea_major" width="100%">专业</th>
			<th field="tea_finishschool" width="100%">毕业(就读)学校</th>
			<th field="tea_resum" width="100%">简历</th>
			<th field="tea_tel_no_home" width="100%">家庭电话</th>
			<th field="tea_home_add" width="100%">家庭住址</th>
			<th field="tea_post_no_home" width="100%">邮编</th>
			<th field="tea_come_date" width="100%">任聘日期</th>
			<th field="tea_out_date" width="100%">离职日期</th>
			<th field="tea_ic_no" width="100%">IC卡号</th>
			<th field="is_probation_name" width="100%">试用期</th>
			<th field="tea_part_time_name" width="100%">兼职</th>
			<th field="tea_course" width="100%">授课名称</th>
			<!-- <th field="tea_dept_id_name" width="100%">部门</th> -->
			<th field="tea_tel_no_dept" width="100%">部门个人电话</th>
			<th field="tea_remark" width="100%">备注</th>
			<!-- <th field="tea_disabled" width="100%">是否启用</th> -->


		</tr>
	</thead>
</table>
</div>
<div id="user-window" title="教师管理窗口"
	style="width: 800px; height: 400px;">
<form method="post">
<table border="1" cellpadding="1" cellspacing="1" bordercolor="#E7E7E7">
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>教师姓名</strong></td>
		<td align="left"><input type="text" size="32"
			name="tea_real_name" id="tea_real_name" value="" maxlength="20"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>性别</strong></td>
		<td align="left"><input class="easyui-combobox" name="tea_sex"
			url="sex.json" valueField="text" textField="text" multiple="false"
			panelHeight="auto" required="false"></input></td>
		<td rowspan="4" align="center"><img width="120px" height="118px"
			src="msn.gif" ondblclick=""></img><input type="hidden"
			name="tea_photo" id="tea_photo" value="images/msn.gif"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>生日</strong></td>
		<td align="left"><input type="text" class="Wdate" size="32"
			name="tea_birthday" id="tea_birthday" value="" maxlength="10"
			onClick=WdatePicker();></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>联系方式</strong></td>
		<td align="left"><input type="text" size="32"
			name="tea_mobile_no" id="tea_mobile_no" value="" maxlength="20"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>Email</strong></td>
		<td align="left"><input type="text" size="32" name="tea_email"
			id="tea_email" value="" maxlength="100" class="easyui-validatebox"
			required="false" validType="email"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>QQ</strong></td>
		<td align="left"><input type="text" size="32" name="tea_qq_no"
			id="tea_qq_no" value="" maxlength="20" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>MSN</strong></td>
		<td align="left"><input type="text" size="32" name="tea_msn_no"
			id="tea_msn_no" value="" maxlength="50" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>学历</strong></td>
		<td align="left">
		<input class="easyui-combobox" name="tea_diploma"
			url="/pxglxt/dic_educationbackground/getDicsForComb"
			valueField="dickey" textField="dicvalue" multiple="false"
			panelHeight="auto" required="false"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>专业</strong></td>
		<td align="left"><input type="text" size="32" name="tea_major"
			id="tea_major" value="" maxlength="100" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>毕业(就读)学校</strong></td>
		<td align="left" colspan="2"><input type="text" size="32"
			name="tea_finishschool" id="tea_finishschool" value=""
			maxlength="100" class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>简历</strong></td>
		<td align="left"><textarea name="tea_resum" id="tea_resum"
			class="easyui-validatebox" required="false"
			style="height: 100px; width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></textarea>
		</td>
		<td align="left"><strong>家庭电话</strong></td>
		<td align="left" colspan="2"><input type="text" size="32"
			name="tea_tel_no_home" id="tea_tel_no_home" value="" maxlength="20"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>家庭住址</td>
		<td align="left"><input type="text" size="32" name="tea_home_add"
			id="tea_home_add" value="" maxlength="100" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>邮编</strong></td>
		<td align="left" colspan="2"><input type="text" size="32"
			name="tea_post_no_home" id="tea_post_no_home" value="" maxlength="20"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>任聘日期</td>
		<td align="left"><input type="text" class="Wdate" size="32"
			name="tea_come_date" id="tea_come_date" value="" maxlength="10"
			onClick=WdatePicker();></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>离职日期</strong></td>
		<td align="left" colspan="2"><input type="text" class="Wdate"
			size="32" name="tea_out_date" id="tea_out_date" value=""
			maxlength="10" onClick=WdatePicker();></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>IC卡号</td>
		<td align="left"><input type="text" size="32" name="tea_ic_no"
			id="tea_ic_no" value="" maxlength="100" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
		<td align="center" bgcolor="#F6F6F6"><strong>试用期</strong></td>
		<td align="left" colspan="2"><input class="easyui-combobox"
			name="is_probation" url="/pxglxt/dic_labourtype/getDicsForComb"
			valueField="dickey" textField="dicvalue" multiple="false"
			panelHeight="auto" required="false"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>兼职</td>
		<td align="left"><input class="easyui-combobox"
			name="tea_part_time" url="/pxglxt/dic_teachertype/getDicsForComb"
			valueField="dickey" textField="dicvalue" multiple="false"
			panelHeight="auto" required="false"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>授课名称</strong></td>
		<td align="left" colspan="2"><input type="text" size="32" name="tea_course"
			id="tea_course" value="" maxlength="100" class="easyui-validatebox"
			required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<!-- <td align="center" bgcolor="#F6F6F6"><strong>部门</td>
		<td align="left"><input class="easyui-combobox"
			name="tea_dept_id" id="tea_dept_id"
			url="/pxglxt/department/getDepartmentsForComb" valueField="dept_no"
			textField="dept_name" multiple="false" panelHeight="auto"
			required="false"></input></td>-->
		<td align="center" bgcolor="#F6F6F6"><strong>部门个人电话</strong></td>
		<td align="left" colspan="2"><input type="text" size="32"
			name="tea_tel_no_dept" id="tea_tel_no_dept" value="" maxlength="20"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input>
		</td>
	</tr>

	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>是否启用</strong></td>
		<td align="left"><input class="easyui-combobox"
			name="tea_disabled" url="disabled.json" valueField="id"
			textField="text" multiple="false" panelHeight="auto" required="true"></input>
		</td>
	</tr>

	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>备注</strong></td>
		<td align="left" colspan="4"><textarea name="tea_remark"
			id="tea_remark" class="easyui-validatebox" required="false"
			style="height: 100px; width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></textarea>
		</td>
	</tr>
</table>
</form>
<div style="text-align: center; padding: 5px;"><a
	href="javascript:void(0)" onclick="saveTeacher()" id="btn-save"
	icon="icon-save">确定</a> <a href="javascript:void(0)"
	onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a></div>
</div>
</body>
</html>
